<template>
  <section>
    <el-breadcrumb separator-class="el-icon-arrow-right">
      <el-breadcrumb-item :to="{ path: '/' }">首页</el-breadcrumb-item>
      <el-breadcrumb-item>用户信息管理</el-breadcrumb-item>
      <el-breadcrumb-item :to="{ path: '/organization' }">机构管理</el-breadcrumb-item>
      <el-breadcrumb-item>机构信息表单</el-breadcrumb-item>
    </el-breadcrumb>
    <form>
      <table>
        <tr>
          <td>
            机构名称：
          </td>
          <td>
            <input  placeholder="机构名称" v-model="org.orgName">
          </td>
        </tr>
        <tr>
          <td>
            机构编号：
          </td>
          <td>
            <input  placeholder="机构编号" v-model="org.orgCode">
          </td>
        </tr>
        <tr>
          <td>
            值班电话：
          </td>
          <td>
            <input  placeholder="值班电话" v-model="org.phone">
          </td>
        </tr>
        <tr>
          <td>
            date：
          </td>
          <td>
            <input  placeholder="date" v-model="org.date">
          </td>
        </tr>
        <tr>
          <td>
            address：
          </td>
          <td>
            <textarea  placeholder="address" v-model="org.address"></textarea>
          </td>
        </tr>
        <tr>
          <td colspan="2">
            <button type="button" v-on:click="submitForm()">保存</button>
          </td>
        </tr>
      </table>
    </form>
  </section>
</template>

<script type="text/javascript">
  export default{
    name: 'organizationForm',
    data(){
      const org = {
        orgId:'',
        orgName:'',
        orgCode:'',
        phone:'',
        date:'',
        address:''
      };
      return {
        org
      }
    },
    methods:{
      submitForm:function (){
        this.$router.push({
          name:'organization',
          params:{
            formData:this.org
          }
        });
      }
    }
  }
</script>
